# ~*~ coding: utf-8 ~*~
from apps.config import ConfigManager

CONFIG = ConfigManager.load_user_config()

SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{username}:{password}@{host}:{port}/{db}?charset=utf8'.format(
    username=CONFIG.get('DB_USER'), password=CONFIG.get('DB_PASSWORD'),
    host=CONFIG.get('DB_HOST'), port=CONFIG.get('DB_PORT'), db=CONFIG.get('DB_NAME')
)
SQLALCHEMY_TRACK_MODIFICATIONS = True

# 这个时间不能大于连接池的回收时间
# SQLALCHEMY_POOL_RECYCLE = 50
